﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Skyhook.Resources;

namespace Skyhook.Core
{
    static public class VisualsEngine
    {
        static IVisualsEngine Engine = null;

        static VisualsEngine()
        {
        }

        static public void Initialize<ET>() where ET : class, IVisualsEngine, new()
        {
            Engine = new ET();
        }

        static public IVisualObject CreateVisualObject(string spritename, IResource image, int[] groupnums, string layername, IRenderer renderer = null)
        {
            return Engine.CreateVisualObject(spritename, image, groupnums, layername, renderer);
        }
        static public IRenderer CreateVisualRenderer(int type)
        {
            return Engine.CreateVisualRenderer(type);
        }
        static public void InitializeAndRegisterComponent(Microsoft.Xna.Framework.Game game, IOnScreenView view, int draworder)
        {
            Engine.InitializeAndRegisterComponent(game, view, draworder);
        }
        static public int VisualsOnScreen
        {
            get
            {
                return Engine.VisualsOnScreen;
            }
        }
    }
}
